<template>
  <el-container class="juejin-home common-layout">
    <!-- 顶部导航栏 -->
    <el-header class="juejin-header">
      <div class="header-content">
        <h1 class="logo">法律咨询</h1>
        <el-menu mode="horizontal" class="menu" router>
          <el-menu-item index="/">首页</el-menu-item>
          <el-menu-item index="/about">发布法律咨询贴</el-menu-item>
          <el-menu-item index="/study">答疑咨询贴</el-menu-item>
          <el-menu-item index="/question">法律学习</el-menu-item>
          <el-menu-item  index="/user">我的</el-menu-item>
          <el-menu-item  index="/login">登录</el-menu-item>
          <el-menu-item  index="/register">注册</el-menu-item>
        </el-menu>
      </div>
    </el-header>

    <!-- 主体内容 -->
    <el-container>
      <!-- 侧边栏 -->
      <el-aside width="200px" class="sidebar">
        <div class="sidebar-content">
          <h2>分类</h2>
          <el-menu class="category-menu">
            <el-menu-item index="1">前端</el-menu-item>
            <el-menu-item index="2">后端</el-menu-item>
            <el-menu-item index="1">算法</el-menu-item>
            <el-menu-item index="2">人工智能</el-menu-item>
            <el-menu-item index="3">区块链</el-menu-item>
          </el-menu>
        </div>
      </el-aside>

      <!-- 主内容区 -->
      <el-main class="main-content">
        <router-view/>

      </el-main>
     
    </el-container>
  </el-container>

</template>

<script>

</script>

<style scoped>
.juejin-home {
  height: 100vh;
}

.juejin-header {
  background-color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #409EFF;
}

.menu {
  flex-grow: 1;
  margin-left: 20px;
}

.sidebar {
  background-color: #f5f5f5;
  border-right: 1px solid #ebeef5;
}

.sidebar-content {
  padding: 20px;
}

.category-menu {
  width: 100%;
}

.main-content {
  padding: 20px;
}


</style>